package com.atgm.mall.gmmailorder.service;

import com.atgm.mall.gmmailorder.vo.req.OrderReqVo;
import com.atgm.common.to.PayOrderVo;
import com.atgm.mall.gmmailorder.vo.resp.OrderDetailRespVo;
import com.atgm.mall.gmmailorder.vo.resp.OrderItemRespVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atgm.common.utils.PageUtils;
import com.atgm.mall.gmmailorder.entity.OrderEntity;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 订单
 *
 * @author pdx
 * @email 945097967@qq.com
 * @date 2021-08-20 10:06:51
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 订单确认页面数据
     * @param gameIds
     * @return
     */
    OrderItemRespVo handlerOrerConfirm(List<Long> gameIds);

    /**
     * 提交订单
     * @param orderReqVo
     */
    String submitOrderInfo(OrderReqVo orderReqVo);

    /**
     * 获取用户订单信息
     * @param status
     * @return
     */
    List<OrderDetailRespVo> queryOrderList(Integer status);

    /**
     * 获取用户单个订单信息
     * @param orderSn
     * @return
     */
    OrderDetailRespVo queryOrderInfo(String orderSn);

    /**
     * 获取该订单的价格
     * @param orderSn
     * @return
     */
    BigDecimal queryPriceByOrderSn(String orderSn);

    /**
     * 支付完成，修改状态
     * @param payOrderVo
     */
    void updateOrderPay(PayOrderVo payOrderVo);

    /**
     * 修改订单的状态
     * @param orderSn
     * @param status
     */
    void updateStatusInfo(String orderSn, Integer status);
}

